<?php

/**
* A simple, easy-to-use, redirect extension.
*
* @param String $destination The URL redirect to
* @param Integer $type The kind of redirection
* @param Integer $delay The delay, in seconds, before actually redirecting
* @author Daniel Wilhelm II Murdoch <wilhelm.murdoch@gmail.com>
* @since v 1.0.0
* @return Void
*/

if(false == function_exists('redirect'))
{
	function redirect($destination, $type = 1, $delay = 3)
	{
		switch($type)
		{
			case 1:

				die(@header("LOCATION: {$destination}"));
				break;

			case 2:

				@header("Refresh: {$delay};url={$destination}");
				break;
		}

		return true;
	}
}

?>